import { GCellRenderer } from "../../../../../../com/mui/controls/GCellRenderer";
import { ObjCreate } from "../../../common/ObjCreate";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { SRobCityThreeJoinTeam } from "../../../../../../Message/Public/SRobCityThreeJoinTeam";
import { EntityUtil } from "../../../../scene/layer/utils/EntityUtil";
import { ListData } from "../../../../../../fl/controls/listClasses/ListData";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
//class GuildRobCityCopyThreeListRenderer
    
    export  class GuildRobCityCopyThreeListRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            this._rankLabel = ObjCreate.createGTextField("", 0, 0, 30, 20, this, GlobalStyle.getTextFormatCenter(GlobalStyle.textFormat6));
            this._nameLabel = ObjCreate.createGTextField("", 35, 0, 150, 20, this, GlobalStyle.textFormat6);
            this._hurtLabel = ObjCreate.createGTextField("", 165, 0, 85, 20, this, GlobalStyle.getTextFormatCenter(GlobalStyle.textFormat6));
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            var loc1=arg1 as SRobCityThreeJoinTeam;
            if (loc1) 
            {
                this._nameLabel.htmlText = "[" + EntityUtil.getProxyName(loc1.sEntityId) + "]  " + loc1.guildName;
                this._hurtLabel.htmlText = "" + loc1.hurt;
            }
            return;
        }

        public /* override */ set listData(arg1: ListData)
        {
            super.listData = arg1;
            if (listData) 
            {
                this._rankLabel.htmlText = "" + (listData.index + 1);
            }
            return;
        }

        /* internal */ /* var */_rankLabel: GTextFiled;

        /* internal */ /* var */_nameLabel: GTextFiled;

        /* internal */ /* var */_hurtLabel: GTextFiled;
    }
